<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="format-detection" content="telephone=no" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
		<script src="../../script/mui.min.js"></script>
		<script src="../../script/jquery.min.js"></script>
		<link rel="stylesheet" href="../../css/mui.min.css" />
		<link rel="stylesheet" href="../../css/CFNetPP_Base.css">
		<link rel="stylesheet" type="text/css" href="../../css/weui.min.css">
		<link rel="stylesheet" href="../../css/base.css"/>
		<link rel="stylesheet" href="../../css/personal.css">
		<link rel="stylesheet" href="../../css/exam.css">
		<link rel="stylesheet" href="../../css/swiper-3.4.2.min.css">
		<link rel="stylesheet" href="../../css/courseTest.css">
		<title>老师端课程考核未批改详情页</title>
		<script type="text/javascript" charset="utf-8">
			mui.init();
		</script>
		<style>
			.swiper-wrapper {
				min-height: 450px
			}
			.stu-test .mui-btn-primary {
				color: #fff;
				background-color: #FF9900;
				border: 1px solid #FF9900;
				padding-left: 2em;
				padding-right: 2em;
			}
			.questionItemImgDiv {
				height: 12em;
				width: 80%;
				max-height: 14em;
				max-width: 95%;
				margin-left: 13px;
			}
			.xuanzeImgDiv {
				width: 80%;
				height: 8em;
				max-height: 10em;
			}
			.tiankong {
				font-family: inherit;
				border-bottom: 1px solid #000;
				margin: 0 8px;
				text-align: center;
				width: auto;
				/*word-break:break-all*/
			}
			.question_video_div {
				padding: 10px 10px;
				padding-left: 20px;
			}
			.question_video_div	video {
				width: 100%;
				height: 13em;
				background-color: black;
			}
			.question_video_div	img {
				width: 100%;
				height: 10em;
				background-color: black;
			}
			.option_video_div {
				padding: 10px 10px;
				padding-left: 55px;
			}
			.option_video_div	img {
				width: 100%;
				height: 8em;
				background-color: black;
			}
			.option_video_div	video {
				width: 100%;
				height: 12em;
			}
		</style>
	</head>
	<body >
		<div class="stu-test" id="scroll">
			<div class="base_style_color" id='BarAppearance' style="height: 22px;width: 100%; position:fixed; left: 0px;top:0px;z-index: 998" ></div>
			<div class="base_navigation_bar base_style_color base_navigation_item_bar" style="position: fixed;left: 0px;top: 20px;">
				<a class="base_left_item" href="#" onclick="backTestToast()"> <img class="base_back_icon" src="../../image/icon_jiantou.png" alt=""> </a>
				<span id="title"></span>
				<!--<a class="base_right_item " id="describe"  onclick="openBewrite()" style="display: none;"> 描述</a>-->
			</div>
			<div class="space10 top_44"></div>
			<div class="k-con test-m-bottom70 test-analysis" id="question_div">
				<div class="swiper-container">
					<div class="swiper-wrapper" ></div>
				</div>
			</div>
			<div class="k-con1 k-text-center k-fixed-bottom test-bottom1" id="sub_bt">
				<div class="k-con-part1">
					<button id="sub_bt_div"   type="button" class="mui-btn mui-btn-primary " onclick="CheckSubmit()" style="text-align: center;" >
						提交
					</button>
					<div class="test_card_div">
						<a class="base_right_item "style="color: #18B4ED" href="#popover-card">答题卡 </a>
					</div>
				</div>
			</div>
			<div id="popover-card" class="mui-popover test-num-card" style=" width: 97% ;">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll" id="scroll-card"></div>
				</div>
			</div>
			<div id="offlineAlert" class="weui_dialog_confirm" style="display: none;">
				<div class="weui_mask"></div>
				<div class="weui_dialog" >
					<div class="weui_dialog_hd">
						<strong class="weui_dialog_title" id="checkNum"></strong>
					</div>
					<div class="weui_dialog_bd"></div>
					<div class="weui_dialog_ft">
						<a onclick="cleanCancel()" href="#" class="weui_btn_dialog default"  style="color:#18b4ed">取消</a>
						<a onclick="cleanConfirm()" href="#" class="weui_btn_dialog primary"  style="color:#18b4ed">确定</a>
					</div>
				</div>
			</div>
			<div class="weui_dialog_alert" id="closeAlert" style="display: none;">
				<div class="weui_mask"></div>
				<div class="weui_dialog" >
					<div class="weui_dialog_hd">
						<strong class="weui_dialog_title" id="checkNum2"></strong>
					</div>
					<div class="weui_dialog_ft">
						<a onclick="Cancel()" href="#" class="weui_btn_dialog primary"  style="color:#18b4ed">确定</a>
					</div>
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script src="../../script/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../script/MD5.js"></script>
	<script src="../../script/common.js"></script>
	<script src="../../script/swiper-3.4.2.jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../script/requestTool.js"></script>
	<script type="text/javascript" src="../../script/courseTest.js"></script>
	<script type="text/javascript" src="../../script/attachmentManager.js"></script>
	<script type="text/javascript">
		var daan = new Object();
		var pid = "";
		// 计划id
		var cid = "";
		//课程id
		var chapterid = "";
		//章节id
		var tid = "";
		var stime = "";
		var json_jieguo = new Object();
		var Subjective_questionLen = '';
		var Objective_questionLen = '';
		var questionLen = '';
		var qidArr = new Array();
		var clickNum = "";
		apiready = function() {
			sendBuriedNotifi('0', '老师端课程考核未批改详情页', '076');
			var h = api.winHeight * 0.3;
			$('#popover-card').css('height', h);
			var pageParam = api.pageParam;
			$('#title').text(api.pageParam.rename);
			showProgress();
			scrollUI();
			//获取数据
			loadData();
			// 滚动监听
			listenScroll();
		}
		function sendBuriedNotifi(busionessid, pagetype, pagetypeid) {
			var userinfo = {
				uid : $api.getStorage('cfnetppuid'),
				jid : $api.getStorage('cfnetppjxid'),
				uname : $api.getStorage('cfnetppusername'),
				exam_id : api.pageParam.examid,
				sid : api.pageParam.score_id,
			}
			var data = {
				busionessid : busionessid,
				pagetype : pagetype,
				pagetypeid : pagetypeid,
				sourceurl : api.pageParam.sourceurl,
				sourcetitle : api.pageParam.sourcetitle,
				accesspageurl : window.location.pathname,
				accesspagetitle : document.title,
				userinfo : userinfo
			}
			SendBehaviorTrajectoriesNotifi_Study(data);
		}

		//自由课程获取已提交测验信息
		function loadData() {
			var params = {
				exam_id : api.pageParam.examid,
				sid : api.pageParam.score_id,
				user_id : api.pageParam.user_id,
			};
			cfnetppPOST(url_getCourseExamjiuguo, params, true, function(data, status) {
				api.hideProgress();
				if (status == 'success') {
					if (data.code == 200) {
						//						var examList = GetHtmlTestArrayList(list);
						var list = data.data;
						if (list != '') {
							GetHtmlTestList(list);
						} else {
							back('题目为空');
						}
					} else if (data.code == 128) {
						back('当前章节数据为空');
						clickNum = 3;
					} else {
						back('数据异常');
						clickNum = 3;
					}
				} else {
					api.toast({
						msg : '网络异常',
						duration : 2000,
						location : 'bottom'
					});
				}
			});
		}

		//创建相应题目id对应的对象
		function setUpObject(data) {
			var questions = data;
			for (var i = 0; i < questions.length; i++) {
				var question = questions[i];
				//子问题数组
				if (question.qtype == '4' || question.qtype == '10') {//论述题
					qidArr.push(question.qid);
					//取出子题目
					daan[question.qid] = new Array();
				}
			}
		}

		//删除未回答的题目数组
		function DeleteAnswerNullData() {
			for (var k = 0; k < qidArr.length; k++) {
				if (daan[qidArr[k]] == null || daan[qidArr[k]] == "") {
					delete daan[qidArr[k]];
				}
			}
		}

		//拼接题目数组
		function GetHtmlTestList(list) {
			var data = list;
			var dataArr = new Array();
			var subjectiveArr = new Array();
			var objectiveArr = new Array();
			var danArr = new Array();
			var duoArr = new Array();
			var panArr = new Array();
			var shituArr = new Array();
			var paixuArr = new Array();
			var shipinArr = new Array();
			var lunshuArr = new Array();
			var anliArr = new Array();
			if (data != null && data != '') {
				if (data.dan != undefined && data.dan.length > 0 && data.dan != '' && data.dan != null) {
					for (var i = 0; i < data.dan.length; i++) {
						var weeklyData = data.dan[i];
						danArr.push(weeklyData);
					}
				}
				if (data.duo != undefined && data.duo.length > 0 && data.duo != '' && data.duo != null) {
					for (var i = 0; i < data.duo.length; i++) {
						var duoData = data.duo[i];
						duoArr.push(duoData);
					}
				}
				if (data.pan != undefined && data.pan.length > 0 && data.pan != '' && data.pan != null) {
					for (var i = 0; i < data.pan.length; i++) {
						var panData = data.pan[i];
						panArr.push(panData);
					}
				}
				if (data.lunshu != undefined && data.lunshu.length > 0 && data.lunshu != '' && data.lunshu != null) {
					for (var i = 0; i < data.lunshu.length; i++) {
						var lunshuData = data.lunshu[i];
						lunshuArr.push(lunshuData);
					}
				}
				if (data.shitu != undefined && data.shitu.length > 0 && data.shitu != '' && data.shitu != null) {
					for (var i = 0; i < data.shitu.length; i++) {
						var shituData = data.shitu[i];
						shituArr.push(shituData);
					}
				}
				if (data.paixu != undefined && data.paixu.length > 0 && data.paixu != '' && data.paixu != null) {
					for (var i = 0; i < data.paixu.length; i++) {
						var paixuData = data.paixu[i];
						paixuArr.push(paixuData);
					}
				}
				if (data.shipin != undefined && data.shipin.length > 0 && data.shipin != '' && data.shipin != null) {
					for (var i = 0; i < data.shipin.length; i++) {
						var shipinData = data.shipin[i];
						shipinArr.push(shipinData);
					}
				}
				if (data.anli != undefined && data.anli.length > 0 && data.anli != '' && data.anli != null) {
					for (var i = 0; i < data.anli.length; i++) {
						var anliData = data.anli[i];
						anliArr.push(anliData);
					}
				}
				dataArr = dataArr.concat(lunshuArr, anliArr, danArr, duoArr, panArr, shituArr, paixuArr, shipinArr);
				subjectiveArr = subjectiveArr.concat(danArr, duoArr, panArr, shituArr, paixuArr, shipinArr);
				objectiveArr = objectiveArr.concat(lunshuArr, anliArr);
				SetUI(dataArr, subjectiveArr, objectiveArr);
			}
			if (objectiveArr.length == 0) {
				document.getElementById("sub_bt_div").style.visibility = "hidden";
			}
		}

		// 滚动监听
		function listenScroll() {
			var winHeight = $(window).height();
			//获取当前页面高度
			$(window).resize(function() {
				var thisHeight = $(this).height();
				if (winHeight - thisHeight > 50) {
					//当软键盘弹出，在这里面操作
					$("#sub_bt").css('display', 'none');
				} else {
					$("#sub_bt").css('display', 'block');
					//当软键盘收起，在此处操作
				}
			});
		}

		//input只能输入文字
		function onlyNum(obj, score) {
			var str = parseInt(score);
			obj.value = obj.value.replace(/[^\d]/g, '');
			if (obj.value > str) {
				obj.value = str;
			}
		}

		//得到论述题评分数据
		function getLunShuItemScore(slideNumber) {
			var duooptionid = '';
			//多选题选项id
			var danoptionid = '';
			//单选题选项id
			var duoQuestionid = '';
			//多选题题目id
			var danQuestionid = '';
			var duoObject = new Object();
			//单选题tiid
			var lunshuQuestionid = "";
			var Itemindex = '';
			//论述题id
			var duoQuestionidArr = new Array();
			var lunshuContentScore = "";
			var lunshuScore = '';
			var itemFenshu = '';
			var itemtype = $(".swiper-wrapper").children().eq(slideNumber).attr('itemtype');
			//获取题目类型
			if (itemtype == '4' || itemtype == '10') {
				$(".swiper-wrapper").children().eq(slideNumber).find('input').on('input', function() {
					lunshuQuestionid = $(this).attr('itemid');
					//				//论述题内容
					itemFenshu = parseInt($(this).attr('itemscore'));
					lunshuContentScore = parseInt($(this).val());
					Itemindex = slideNumber - Subjective_questionLen;
					if (lunshuContentScore != null && lunshuContentScore != '') {
						$("#objective_item_card").find("span").eq(Itemindex).removeClass('qusetion-num').addClass('qusetion-selected');
					}
					if (lunshuContentScore > itemFenshu) {
						lunshuScore = itemFenshu;
					} else {
						lunshuScore = lunshuContentScore;
					}
					daan[lunshuQuestionid] = lunshuScore;
				});
			}
		}

		//拼接html字符串
		function SetUI(list, subjectiveArr, objectiveArr) {
			var qxuan = '';
			var data = list;
			var qdaanStr = '';
			var OrderNumStr = "";
			var xuanzeStr = "";
			var questionStr = "";
			var scoreStr = "";
			setUpObject(data);
			Subjective_questionLen = subjectiveArr.length;
			Objective_questionLen = objectiveArr.length;
			questionLen = data.length;
			popoverCardNum(questionLen);
			for (var i = 0; i < questionLen; i++) {
				if (data[i] != null && data[i] != '') {
					qxuan = ArrayIsNull(JSON.parse(data[i].qxuanxiang));
					if (data[i].hasOwnProperty('user_answer')) {
						var userchoose = '';
						var xuanzeStr = '';
						$(".swiper-wrapper").append('<div class="swiper-slide" id="item' + (i + 1) + '" itemtype="' + data[i].qtype + '"></div>')
						var qdaanStr = '';
						questionStr = data[i].qtype != 11 ? questionsImgIsNull(data[i].questions) : FillInBlankQuestionStr(data[i]);
						if (data[i].qtype == 1 || data[i].qtype == 3 || data[i].qtype == 8) {
							if (data[i].user_answer == DanqdaanNull(data[i].qdaan, data[i].qjiexi)) {//答案正确
								qdaanStr = '<p class="k-cred">' + "正确答案:" + DanqdaanNull(data[i].qdaan, data[i].qjiexi) + '</p>'
								$("#scroll-card").find("span").eq(i - Objective_questionLen).removeClass('qusetion-num-normal').addClass('qusetion-num-true');
							} else {
								qdaanStr = '<p class="k-cred">' + "正确答案:" + DanqdaanNull(data[i].qdaan, data[i].qjiexi) + '</p>'
								$("#scroll-card").find("span").eq(i - Objective_questionLen).removeClass('qusetion-num-normal').addClass('qusetion-num-false');
							}
							$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + (i + 1 - Objective_questionLen) + "、" + "(" + data[i].qfenshu + "分 " + ")" + questionStr + '</p>' + qdaanStr + '<div class="test-answer-list left_15" >' + '</div>' + '</div>' + '<div class="mui-input-row "style="margin-top: 23px">' + '</div>')
							//	是单选或判断
							for (var k = 0; k < qxuan.length; k++) {
								xuanzeStr = xuanzheImgIsNull(qxuan[k].xuanzhe);
								if (data[i].user_answer != "" && data[i].user_answer != null) {
									if ((k + 1 ) != charCodeAt(data[i].user_answer)) {
										$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-radio mui-left " >' + '<label>' + xuanzeStr + '</label>' + '<input dataindex="' + (k + 1) + '"  onclick="return false;"   name="radio' + data[i].qid + '" type="radio"   itemid="' + data[i].qid + '">' + '</div> ')
									} else {
										$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-radio mui-left " >' + '<label>' + xuanzeStr + '</label>' + '<input dataindex="' + (k + 1) + '"  checked="checked"  onclick="return false;"   name="radio' + data[i].qid + '" type="radio"   itemid="' + data[i].qid + ' checked="checked" ">' + '</div> ')
									}
								} else {
									$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-radio mui-left Empty_title" >' + '<label>' + xuanzeStr + '</label>' + '<input dataindex="' + (k + 1) + '"    onclick="return false;"   name="radio' + data[i].qid + '" type="radio"    disabled>' + '</div> ')
								}
							}
						} else if (data[i].qtype == 2 || data[i].qtype == 9) {
							var keys1 = [];
							keys1 = getCjjieguoKey(data[i].user_answer);
							var userchooseLetter = [];
							for (var j = 0; j < keys1.length; j++) {
								userchooseLetter.push(charCodeAt(keys1[j]))
							}
							var qdaanArr = DuoqdaanNull(data[i].qdaan, data[i].qjiexi);
							if (keys1.toString() == qdaanArr.toString()) {//答案正确
								qdaanStr = '<p class="k-cred left_10">' + "正确答案:" + DuoqdaanNull(data[i].qdaan, data[i].qjiexi); +'</p>'
								$("#scroll-card").find("span").eq(i - Objective_questionLen).removeClass('qusetion-num-normal').addClass('qusetion-num-true');
							} else {
								$("#scroll-card").find("span").eq(i - Objective_questionLen).removeClass('qusetion-num-normal').addClass('qusetion-num-false');
								qdaanStr = '<p class="k-cred left_10">' + "正确答案:" + DuoqdaanNull(data[i].qdaan, data[i].qjiexi); +'</p>'
							}
							$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + (i + 1 - Objective_questionLen ) + "、" + "(" + data[i].qfenshu + "分 " + ")" + questionStr + '</p>' + qdaanStr + '<div class="test-answer-list left_10" >' + '</div>' + '</div>')
							//	是多选
							for (var k = 0; k < qxuan.length; k++) {
								xuanzeStr = xuanzheImgIsNull(qxuan[k].xuanzhe);
								if (userchooseLetter.toString().indexOf(k + 1) == -1) {
									$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-checkbox mui-left" >' + '<label>' + xuanzeStr + '</label>' + '<input dataindex="' + (k + 1) + '" name="checkbox1"  onclick="return false;"    value="Item 1" type="checkbox"  itemid="' + data[i].qid + '">' + '</div>')
								} else {
									$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-checkbox mui-left" >' + '<label>' + xuanzeStr + '</label>' + '<input dataindex="' + (k + 1) + '"  checked="checked"   onclick="return false;"  name="checkbox1" value="Item 1" type="checkbox"  itemid="' + data[i].qid + '">' + '</div>')
								}
							}
						} else if (data[i].qtype == 4 || data[i].qtype == 10) {
							$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + (i + 1 + Subjective_questionLen) + "、" + "(" + data[i].qfenshu + "分 " + ")" + questionStr + '</p>' + '<div class="test-answer-list left_15" >' + '</div>' + '</div>' + '<div class="mui-input-row pingfen" style="margin-top: 23px;margin-left: 0.3rem">' + '<label>评分:' + '</label>' + '<input type="number"  id="grade" onkeyup="onlyNum(this,' + data[i].qfenshu + ')" itemid="' + data[i].qid + '"  itemscore="' + data[i].qfenshu + '" onclick="getLunShuItemScore(' + i + ')" >' + '</div>')
							// 论述
							$("#item" + (i + 1) + " .test-answer-list").append('<div class="test-answer-list">' + '<textarea  class="k-texttarea k-f14" readonly="readonly"    id="content" itemid="' + data[i].qid + '">' + dtjieguoIsNull(data[i].user_answer) + '</textarea>' + '</div>')
						} else if (data[i].qtype == 7) {//识图题
							var keys1 = [];
							keys1 = getCjjieguoKey(data[i].user_answer);
							var userchooseLetter = [];
							for (var j = 0; j < keys1.length; j++) {
								userchooseLetter.push(charCodeAt(keys1[j]))
							}
							var qdaanArr = DuoqdaanNull(data[i].qdaan, data[i].qjiexi);
							if (data[i].user_answer != '' && data[i].user_answer != null) {
								if (keys1.toString() == qdaanArr.toString()) {//答案正确
									qdaanStr = '<p class="k-cred left_10">' + "正确答案:" + DuoqdaanNull(data[i].qdaan, data[i].qjiexi) + '</p>'
									$("#scroll-card").find("span").eq(i - Objective_questionLen).removeClass('qusetion-num-normal').addClass('qusetion-num-true');
								} else {
									$("#scroll-card").find("span").eq(i - Objective_questionLen).removeClass('qusetion-num-normal').addClass('qusetion-num-false');
									qdaanStr = '<p class="k-cred left_10">' + "正确答案:" + DuoqdaanNull(data[i].qdaan, data[i].qjiexi) + '</p>'
								}
							} else {
							}
							$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + (i + 1 - Objective_questionLen ) + "、" + "(" + data[i].qfenshu + "分 " + ")" + questionStr + '</p>' + qdaanStr + '<div class="test-answer-list left_10" >' + '</div>' + '</div>')
							for (var k = 0; k < qxuan.length; k++) {
								var inputStr = "";
								xuanzeStr = xuanzheImgIsNull(qxuan[k].xuanzhe);
								if (userchooseLetter.toString().indexOf(k + 1) == -1) {
									inputStr = '<input dataindex="' + (k + 1) + '" name="checkbox1"  onclick="return false;"    value="Item 1" type="checkbox"  itemid="' + data[i].qid + '">'
								} else {
									inputStr = '<input dataindex="' + (k + 1) + '"  checked="checked"   onclick="return false;"  name="checkbox1" value="Item 1" type="checkbox"  itemid="' + data[i].qid + '">'
								}
								$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-checkbox mui-left" >' + '<label>' + xuanzeStr + '</label>' + inputStr + '</div>')
							}
						} else if (data[i].qtype == 5) {//视频题
							$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + (i + 1 - Objective_questionLen) + "、" + "(" + data[i].qfenshu + "分 " + ")" + questionStr + '<p class="k-cred left_10">' + "移动端暂不支持上传题,请在PC端查看！" + '</p>' + '</p>' + '<div class="test-answer-list left_10"  onclick="return false;" itemtype="' + data[i].qtype + '">' + '</div>' + '</div>')
						} else if (data[i].qtype == 11) {
							var user_answer = data[i].user_answer.split('|');
							qdaanStr = JudgeQuestionCorrectMessage(data[i], e_display_da, i);
							$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + scoreStr + questionStr + '</p>' + qdaanStr + '<div class="test-answer-list left_10" >' + '</div>' + '</div>');
							$.each(user_answer, function(k, e) {
								$("#item" + (i + 1)).find('.tiankong:eq(' + k + ')').attr("value", e)
								$("#item" + (i + 1)).find('.tiankong:eq(' + k + ')').attr("readonly", "readonly");
							});
						}
					} else {
						back('此测验学生没有相关提交结果');
					}
				} else {
					$(".swiper-wrapper").append('<div class="mui-slider-item" id="item' + (i + 1) + '"  ></div>')
					$("#item" + (i + 1)).append('<div class="k-con-part clearfix tont" >' + '<p class="k-f16 k-c323 k-mt15">' + (i + 1) + "、" + '本题为空' + '</p>' + '<div  class="test-answer-list"      onclick="GetAnswerData(' + i + ')" >' + '</div>' + '</div>')
				}
				$(".mui-slider-item  img").width("90%");
				$(".mui-input-row  img").height(100);
			}
			var mySwiper = new Swiper('.swiper-container', {
				autoHeight : true,
				autoplayDisableOnInteraction : true,
				direction : 'horizontal',
				loop : false,
			})
			// 点击答题卡切换
			$("#popover-card span").on("click", function() {
				var index = $(this).index();
				if (Objective_questionLen == 0) {
					mySwiper.slideTo($(this).index())
				} else {
					if ($(this).index() > Subjective_questionLen - 1) {
						mySwiper.slideTo(($(this).index() - Subjective_questionLen))
					} else {
						mySwiper.slideTo(($(this).index() + Objective_questionLen))
					}
				}
				mui('#popover-card').popover('hide')
			});
		}

		//提交批改数据
		function SubmitData() {
			var param = {
				jid : $api.getStorage('cfnetppjxid'),
				uid : $api.getStorage('cfnetppuid'),
				cid : api.pageParam.cid,
				pid : api.pageParam.pid,
				cuid : api.pageParam.user_id,
				score_id : api.pageParam.score_id,
				sorce : daan,
			};
			cfnetppPOST(url_CourseExamInfo, param, false, function(data, status) {
				hideProgress();
				SendBusinessOperationsLogNotifi('老师端课程考核未批改详情页', '076', param, param, '', data, '老师端课程考核批改接口', '076-01')
				if (status == 'success') {
					if (data.code == 200) {
						ShowToast('批改成功');
						sendNotifi();
						api.closeWin({
						});
					} else if (data.code == 101) {
						back('该测验已经审阅完成');
					} else {
						api.toast({
							msg : '批改失败',
							duration : 2000,
							location : 'bottom'
						});
					}
				} else {
					api.toast({
						msg : '批改失败',
						duration : 2000,
						location : 'bottom'
					});
				}
			});
		}

		//发送相应通知到列表
		function sendNotifi() {
			api.sendEvent({
				name : 'RefreshCourseListNotifi'
			});
		}

		//退出考试提示
		function backTestToast() {
			sendBuriedNotifi('1', '老师端课程考核未批改详情页', '076');
			if (clickNum == 3) {
				api.closeWin({
				});
			} else {
				$("#checkNum").text("是否确定退出批改?");
				$('#offlineAlert').show();
				clickNum = 2;
			}
		}

		//检查题目是否提交
		function CheckSubmit() {
			DeleteAnswerNullData();
			var daanLen = ObjectCount(daan);
			var strLen = Objective_questionLen - daanLen;
			if (strLen == 0) {
				clickNum = 1;
				$("#checkNum").text("是否确定提交批改结果？");
				$('#offlineAlert').show();
			} else {
				clickNum = 4;
				$("#checkNum2").text("您还有" + strLen + "道题未批改,请批改完成后再提交!");
				$('#closeAlert').show();
			}
		}

		//点击取消
		function cleanCancel() {
			$('#offlineAlert').hide();
		}

		//点击确定
		function cleanConfirm() {
			$('#offlineAlert').hide();
			if (clickNum == 1) {
				showProgress();
				DeleteAnswerNullData();
				SubmitData();
			} else if (clickNum == 2) {
				backClick();
			}
		}

		//	生成答题卡题号
		function popoverCardNum(questionLen) {
			for (var i = 0; i < questionLen; i++) {
				$("#scroll-card").append('<span class=" qusetion-num-normal">' + (i + 1) + '</span>')
			}
		}
	</script>
</html>